<h1>
    <center>

        <b>INFORMACION GENERAL DEL PREDIO OBJETO DE EXPLOTACION DE LA EMPRESA COMUNITARIA</b>

    </center>
</h1>

<table>



    <table class="table">
        <thead>
            <tr>

                <th>Nombre del predio</th>
                <th>numero de hectareas</th>
                <th>matricula inmobiliaria</th>
                <th></th>
                <th colspan="4"><center>OPCIONES</center></th>
        </tr>
        </thead>

        <tbody>
            <?php foreach ($properties as $property): ?>
                <tr>
                    <td><?php echo $property['Property']['nombre'] ?></td>
                    <td><?php echo $property['Property']['hectareas'] ?></td>
                    <td><?php echo $property['Property']['matricula_inmobiliaria'] ?></td>
                    <td>
                        <?php
                        
                        if (file_exists("../webroot/files/Empresa-" . $company_id . "/" . $property['Property']['adjunto_matricula']) and $property['Property']['adjunto_matricula'] != "")
                            echo $this->Html->link('Matrícula inmobiliaria', "../files/Empresa-" . $company_id . "/" .$property['Property']['adjunto_matricula'], array('target' => 'blank', 'indicator' => 'loading', 'class' => 'acciones'));
                        ?>
                        <br>
                        <?php 
                        
                        if (file_exists("../webroot/files/Empresa-" . $company_id . "/" . $property['Property']['adjunto_resolucion']) and $property['Property']['adjunto_resolucion'] != "")
                            echo $this->Html->link('Resolución', "../files/Empresa-" . $company_id . "/" .$property['Property']['adjunto_resolucion'], array('target' => 'blank', 'indicator' => 'loading', 'class' => 'acciones'));
                        ?>
                        

                    </td>
                    <td>
                        <?php $this->Ajax->link('Ver', array('action' => 'view', $property['Property']['id']), array('update' => 'properties')) ?>
                        <?php echo $this->Ajax->link('Editar', array('action' => 'edit', $property['Property']['id']), array('update' => 'properties', 'class' => 'acciones')) ?>
                        <?php echo $this->Ajax->link('Adjuntar', array('action' => 'add_files', $property['Property']['id'], $company_id), array('update' => 'properties', 'class' => 'acciones')) ?>
                        <?php echo $this->Ajax->link('Eliminar', array('action' => 'delete', $property['Property']['id'], $company_id), array('update' => 'properties', 'class' => 'acciones'), 'Esta seguro que desea ELIMINAR?') ?></td>
                </tr>
            <?php endforeach; ?>

        </tbody>





    </table>
    <br>
    <br>
    <?php echo $this->Ajax->link('Adicionar Predio', array('controller' => 'properties', 'action' => 'add', $company_id), array('update' => 'properties', 'class' => 'acciones')); ?>


